import Vue from 'vue'
import Router from 'vue-router'
import DateState from '@/components/DateState'
const UserNumber = resolve => require(['@/components/UserNumber'], resolve)
const PaymentAnalysis = resolve => require(['@/components/PaymentAnalysis'], resolve)
const OrderAnalysis = resolve => require(['@/components/OrderAnalysis'], resolve)
const UserDistribution = resolve => require(['@/components/UserDistribution'], resolve)
const NotFound = resolve => require(['@/components/NotFound'], resolve)

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '',
      redirect: '/date-state'
    },
    {
      path: '/date-state',
      name: 'DateState',
      component: DateState
    },
    {
      path: '/user-number',
      name: 'UserNumber',
      component: UserNumber
    },
    {
      path: '/payment-analysis',
      name: 'PaymentAnalysis',
      component: PaymentAnalysis
    },
    {
      path: '/order-analysis',
      name: 'OrderAnalysis',
      component: OrderAnalysis
    },
    {
      path: '/user-distribution',
      name: 'UserDistribution',
      component: UserDistribution
    },
    {
      path: '*',
      name: '404NotFound',
      component: NotFound
    }
  ]
})
